package com.scalar.chiptrack.sales;

import com.scalar.chiptrack.commons.Address;

import java.util.ArrayList;
import java.util.Random;

/**
 * Author: Prabhanjan
 * Date: Mar 17, 2004
 * Time: 3:41:21 PM
 */
public class EndUser
{
    private int endUserId = -1;
    private int customerId = -1;
    private String endUserName = null;
    private int defaultShippingAddressId = -1;
    private int defaultBillingAddressId = -1;
    private String contactPerson = null;

    private Address shippingAddress = new Address();
    private Address billingAddress = new Address();
    private ArrayList shippingLocations = new ArrayList();
    private ContactPerson contactPersonObject = new ContactPerson();
	private ContactPerson billingContactPersonObject = new ContactPerson();
	private ContactPerson shippingContactPersonObject = new ContactPerson();
	//private ContactPerson contactPersonObject = new ContactPerson();

	Random r = new Random();
	private int billAddressId = r.nextInt(123456789)* (-1);
	private int shipAddressId = r.nextInt(123456789)* (-1);


    public int getEndUserId ()
    {
        return endUserId;
    }

    public void setEndUserId ( int endUserId )
    {
        this.endUserId = endUserId;
    }

    public int getCustomerId ()
    {
        return customerId;
    }

    public void setCustomerId ( int customerId )
    {
        this.customerId = customerId;
    }
//	Added by Sarada on 14th April to get billing address contact persons
	public int getBillAddressId() 
	{
	   return billAddressId;
	}
 
	 public void setBillAddressId(int billAddressId) 
	 {
		 this.billAddressId = billAddressId;
	 }
   
	 public int getShipAddressId() 
	 {
		  return shipAddressId;
	 }

	  public void setShipAddressId(int shipAddressId) 
	  {
		  this.shipAddressId = shipAddressId;
	  }  

    public String getEndUserName ()
    {
        return endUserName;
    }

    public void setEndUserName ( String endUserName )
    {
        this.endUserName = endUserName;
    }

    public int getDefaultShippingAddressId ()
    {
        return defaultShippingAddressId;
    }

    public void setDefaultShippingAddressId ( int defaultShippingAddressId )
    {
        this.defaultShippingAddressId = defaultShippingAddressId;
    }

    public int getDefaultBillingAddressId ()
    {
        return defaultBillingAddressId;
    }

    public void setDefaultBillingAddressId ( int defaultBillingAddressId )
    {
        this.defaultBillingAddressId = defaultBillingAddressId;
    }

    public String getContactPerson ()
    {
        return contactPerson;
    }

    public void setContactPerson ( String contactPerson )
    {
        this.contactPerson = contactPerson;
    }

    public Address getShippingAddress ()
    {
        return shippingAddress;
    }

    public void setShippingAddress ( Address shippingAddress )
    {
        this.shippingAddress = shippingAddress;
    }

    public Address getBillingAddress ()
    {
        return billingAddress;
    }

    public void setBillingAddress ( Address billingAddress )
    {
        this.billingAddress = billingAddress;
    }

    public ArrayList getShippingLocations ()
    {
        return shippingLocations;
    }

    public void setShippingLocations ( ArrayList shippingLocations )
    {
        this.shippingLocations = shippingLocations;
    }

    public ContactPerson getContactPersonObject ()
    {
        return contactPersonObject;
    }

    public void setContactPersonObject ( ContactPerson contactPersonObject )
    {
        this.contactPersonObject = contactPersonObject;
    }

    public void setAddShippingLocation(String empty)
    {
        Address address = new Address();
		ArrayList contactPersonList = new ArrayList();
         address.setAddressId(-1);
         address.setAddress1("");
         address.setAddress2("");
         address.setCity("");
         address.setState("");
         address.setZipCode("");
         address.setCountry("");
         address.setContactPerson("");
		 address.setContactPersons(contactPersonList);
		 address.setLocAddressId((new Random().nextInt(123456789))*(-1));
         
         shippingLocations.add(address);
    }
    
    
	//Added by Sarada on 14th April to get billing address contact persons
	public ContactPerson getBillingContactPersonObject()
	{
		 return billingContactPersonObject; 
	}
  
	public void setBillingContactPersonObject(ContactPerson billingContactPersonObject)
	{
		 this.billingContactPersonObject = billingContactPersonObject;
	}
	
	
	public ContactPerson getShippingContactPersonObject()
	{
		return shippingContactPersonObject; 
	}
  
	public void setShippingContactPersonObject(ContactPerson shippingContactPersonObject)
	{
		this.shippingContactPersonObject = shippingContactPersonObject;
	}	
	/*public ContactPerson getShipLocationContactPersonObject()
	{
		return contactPersonObject; 
	}
  
	public void setShipLocationContactPersonObject(ContactPerson contactPersonObject)
	{
		this.contactPersonObject = contactPersonObject;
	}*/


}